package cn.bugDance.infrastructure.gateway.api;

import cn.bugDance.infrastructure.gateway.dto.WeiXinAccessTokenResponseDTO;
import cn.bugDance.infrastructure.gateway.dto.WeiXinTicketRequestDTO;
import cn.bugDance.infrastructure.gateway.dto.WeiXinTicketResponseDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface IWeiXinApiService {

    @GET("cgi-bin/token")
    Call<WeiXinAccessTokenResponseDTO> getToken(
            @Query("grant_type") String grantType,
            @Query("appid") String appid,
            @Query("secret") String secret
    );

    @POST("cgi-bin/qrcode/create")
    Call<WeiXinTicketResponseDTO> getQrCode(
            @Query("access_token") String accessToken,
            @Body WeiXinTicketRequestDTO weiXinTicketRequestDTO
            );

}
